//
//  FPRelationView.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/21.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPRelationView.h"

@implementation FPRelationView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.label = [[UILabel alloc]initWithFrame:CGRectMake((kScreenWidth - kImageW(200))/2, 5, kImageW(200), kImageH(30))];
        self.label.text = @"相关电影/影人";
        self.label.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_label];
        self.canceButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.canceButton.frame = CGRectMake(kImageW(300), 5, kImageW(50), kImageW(30));
        [self.canceButton setTitle:@"关闭" forState:UIControlStateNormal];
        [self addSubview:_canceButton];
        self.lineView = [[UIView alloc]initWithFrame:CGRectMake(0, kImageH(30), kScreenWidth, kImageH(2))];
        self.lineView.backgroundColor = [UIColor redColor];
        [self addSubview:_lineView];
        
        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
        layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
        self.collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, kImageH(32), kScreenWidth, kImageH(168)) collectionViewLayout:layout];
        [self addSubview:_collectionView];
        
    }
    return self;
}
@end
